#include "SkeletonGenerator.h"

SkeletonGenerator::SkeletonGenerator(int numSkeletons)
{
	this->numSkeletons = numSkeletons;

	for(int i = 0; i < this->numSkeletons; i++) {
		this->skeletons[i].setActive(true);
		this->initSkeleton(&(this->skeletons[i]));
	}

}

SkeletonGenerator::~SkeletonGenerator(void)
{
}

void SkeletonGenerator::initSkeleton(Skeleton * skeleton) {
	

	skeleton->getWaist()->getPosition()->setX(0.0);
	skeleton->getWaist()->getPosition()->setY(0.0);
	skeleton->getWaist()->getPosition()->setZ(0.0);

	
	skeleton->getTorso()->getPosition()->setX(0.071133);
	skeleton->getTorso()->getPosition()->setY(-0.917302);
	skeleton->getTorso()->getPosition()->setZ(-2.324341);
	

	skeleton->getNeck()->getPosition()->setX(0.066487);
	skeleton->getNeck()->getPosition()->setY(-0.724436);
	skeleton->getNeck()->getPosition()->setZ(-2.339861);

	/*
	skeleton->getRCollar()->getPosition()->x = 0.25;
	skeleton->getRCollar()->getPosition()->y = 0.5;
	skeleton->getRCollar()->getPosition()->z = 0.0;
	*/

	skeleton->getRShoulder()->getPosition()->setX(0.202404);
	skeleton->getRShoulder()->getPosition()->setY(-0.720113);
	skeleton->getRShoulder()->getPosition()->setZ(-2.326764);
	
	
	skeleton->getRElbow()->getPosition()->setX(0.464606);
	skeleton->getRElbow()->getPosition()->setY(-0.712071);
	skeleton->getRElbow()->getPosition()->setZ(-2.307670);

	/*
	skeleton->getRWrist()->getPosition()->x = 1.0;
	skeleton->getRWrist()->getPosition()->y = 0.5;
	skeleton->getRWrist()->getPosition()->z = 0.0;
	*/

	skeleton->getRHand()->getPosition()->setX(0.711478);
	skeleton->getRHand()->getPosition()->setY(-0.735119);
	skeleton->getRHand()->getPosition()->setZ(-2.257507);

	/*
	skeleton->getRFinger()->getPosition()->x = 1.5;
	skeleton->getRFinger()->getPosition()->y = 0.5;
	skeleton->getRFinger()->getPosition()->z = 0.0;

	skeleton->getLCollar()->getPosition()->x = -0.25;
	skeleton->getLCollar()->getPosition()->y = 0.5;
	skeleton->getLCollar()->getPosition()->z = 0.0;
	*/

	skeleton->getLShoulder()->getPosition()->setX(-0.069431);
	skeleton->getLShoulder()->getPosition()->setY(-0.728760);
	skeleton->getLShoulder()->getPosition()->setZ(-2.352959);

	
	skeleton->getLElbow()->getPosition()->setX(-0.315874);
	skeleton->getLElbow()->getPosition()->setY(-0.724174);
	skeleton->getLElbow()->getPosition()->setZ(-2.357194);

	/*
	skeleton->getLWrist()->getPosition()->x = -1.0;
	skeleton->getLWrist()->getPosition()->y = 0.5;
	skeleton->getLWrist()->getPosition()->z = 0.0;
	*/

	skeleton->getLHand()->getPosition()->setX(-0.581898);
	skeleton->getLHand()->getPosition()->setY(-0.777892);
	skeleton->getLHand()->getPosition()->setZ(-2.279048);

	/*
	skeleton->getLFinger()->getPosition()->x = -1.5;
	skeleton->getLFinger()->getPosition()->y = 0.5;
	skeleton->getLFinger()->getPosition()->z = 0.0;
	*/
	skeleton->getHead()->getPosition()->setX(0.061153);
	skeleton->getHead()->getPosition()->setY(-0.538794);
	skeleton->getHead()->getPosition()->setZ(-2.350367);
	
	skeleton->getRHip()->getPosition()->setX(0.164691);
	skeleton->getRHip()->getPosition()->setY(-1.109141);
	skeleton->getRHip()->getPosition()->setZ(-2.302899);

	
	skeleton->getRKnee()->getPosition()->setX(0.180626);
	skeleton->getRKnee()->getPosition()->setY(-1.482232);
	skeleton->getRKnee()->getPosition()->setZ(-2.201119);

	/*
	skeleton->getRAnkle()->getPosition()->x = 0.25;
	skeleton->getRAnkle()->getPosition()->y = -0.75;
	skeleton->getRAnkle()->getPosition()->z = 0.0;
	*/


	skeleton->getRFoot()->getPosition()->setX(0.190280);
	skeleton->getRFoot()->getPosition()->setY(-1.790680);
	skeleton->getRFoot()->getPosition()->setZ(-2.174107);

	
	skeleton->getLHip()->getPosition()->setX(-0.013078);
	skeleton->getLHip()->getPosition()->setY(-1.114582);
	skeleton->getLHip()->getPosition()->setZ(-2.320196);


	skeleton->getLKnee()->getPosition()->setX(-0.046642);
	skeleton->getLKnee()->getPosition()->setY(-1.486995);
	skeleton->getLKnee()->getPosition()->setZ(-2.219973);

	/*
	skeleton->getLAnkle()->getPosition()->x = -0.25;
	skeleton->getLAnkle()->getPosition()->y = -0.7	5;
	skeleton->getLAnkle()->getPosition()->z = 0.0;
	*/

	skeleton->getLFoot()->getPosition()->setX(-0.048608);
	skeleton->getLFoot()->getPosition()->setY(-1.771473);
	skeleton->getLFoot()->getPosition()->setZ(-2.193910);
	

}